package com.msh.platform.elm.entity;

import javax.persistence.*;
import io.swagger.annotations.ApiModelProperty;
import java.math.BigDecimal;
import java.util.Objects;

@Entity
@Table(name = "seller_info", schema = "mscm_dev", catalog = "")
public class SellerInfo {
	@ApiModelProperty(hidden=true)
    private int id;
	@ApiModelProperty(value="手机号")
    private String phone;
	@ApiModelProperty(value="登录密码")
    private String passwd;
	@ApiModelProperty(value="商会名称")
    private String name;
	@ApiModelProperty(value="商会简介")
    private String detail;
	@ApiModelProperty(value="地区编码")
    private Integer areaCode;
	@ApiModelProperty(value="会员数")
    private Integer memberCnt;
	@ApiModelProperty(value="管理员")
    private String contactName;
	@ApiModelProperty(value="联系邮箱")
    private String contactEmail;
	@ApiModelProperty(value="状态")
    private String status;
	@ApiModelProperty(value="分成比例")
    private BigDecimal payRate;
	@ApiModelProperty(value="是否删除")
    private String delFlag;
	@ApiModelProperty(value="创建时间")
    private Integer createTime;

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "ID")
    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    @Basic
    @Column(name = "PHONE")
    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    @Basic
    @Column(name = "passwd")
    public String getPasswd() {
        return passwd;
    }

    public void setPasswd(String passwd) {
        this.passwd = passwd;
    }

    @Basic
    @Column(name = "NAME")
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    @Basic
    @Column(name = "detail")
    public String getDetail() {
        return detail;
    }

    public void setDetail(String detail) {
        this.detail = detail;
    }

    @Basic
    @Column(name = "AREA_CODE")
    public Integer getAreaCode() {
        return areaCode;
    }

    public void setAreaCode(Integer areaCode) {
        this.areaCode = areaCode;
    }

    @Basic
    @Column(name = "member_cnt")
    public Integer getMemberCnt() {
        return memberCnt;
    }

    public void setMemberCnt(Integer memberCnt) {
        this.memberCnt = memberCnt;
    }

    @Basic
    @Column(name = "CONTACT_NAME")
    public String getContactName() {
        return contactName;
    }

    public void setContactName(String contactName) {
        this.contactName = contactName;
    }
    
    @Basic
    @Column(name = "CONTACT_EMAIL")
    public String getContactEmail() {
        return contactEmail;
    }

    public void setContactEmail(String contactEmail) {
        this.contactEmail = contactEmail;
    }

    @Basic
    @Column(name = "STATUS")
    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    @Basic
    @Column(name = "PAY_RATE")
    public BigDecimal getPayRate() {
        return payRate;
    }

    public void setPayRate(BigDecimal payRate) {
        this.payRate = payRate;
    }

    @Basic
    @Column(name = "del_flag")
    public String getDelFlag() {
        return delFlag;
    }

    public void setDelFlag(String delFlag) {
        this.delFlag = delFlag;
    }

    @Basic
    @Column(name = "CREATE_TIME")
    public Integer getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Integer createTime) {
        this.createTime = createTime;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        SellerInfo that = (SellerInfo) o;
        return id == that.id &&
                Objects.equals(phone, that.phone) &&
                Objects.equals(passwd, that.passwd) &&
                Objects.equals(name, that.name) &&
                Objects.equals(detail, that.detail) &&
                Objects.equals(areaCode, that.areaCode) &&
                Objects.equals(memberCnt, that.memberCnt) &&
                Objects.equals(contactName, that.contactName) &&
                Objects.equals(contactEmail, that.contactEmail) &&
                Objects.equals(status, that.status) &&
                Objects.equals(payRate, that.payRate) &&
                Objects.equals(delFlag, that.delFlag) &&
                Objects.equals(createTime, that.createTime);
    }

    @Override
    public int hashCode() {

        return Objects.hash(id, phone, passwd, name, detail, areaCode, memberCnt, contactName, status, payRate, delFlag, createTime);
    }
}
